<template>子组件</template>

<script>
export default {
  components: {},
  data() {
    return {}
  },
  beforeCreate() {
    console.log('子组件beforeCreate')
  },
  created() {
    console.log('子组件created')
  },
  beforeMount() {
    console.log('子组件beforeMount')
  },
  mounted() {
    console.log('子组件mounted')
  },
  beforeUpdate() {
    console.log('子组件beforeUpdate')
  },
  updated() {
    console.log('子组件updated')
  },
  beforeUnmount() {
    console.log('子组件beforeUnmount')
  },
  unmounted() {
    console.log('子组件unmounted')
  },
  activated() {
    // activated和deactivated只有被keep-alive组件包裹时生效
    console.log('子组件activated-keep-alive')
  },
  deactivated() {
    console.log('子组件deactivated-keep-alive')
  },
}
</script>

<style scoped></style>
